
<?php
error_reporting(E_ALL);

include_once('../controller/includes/db_access.php');

?>

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!--[if lt IE 9]>
<script
src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="styles/style.css" type="text/css" />
<!--[if lte IE 7]>
<link rel="stylesheet" href="style_ie.css" />
<![endif]-->
<title>dbme!!!!</title>
</head>
<body>
<div id="bloc_page">
<header>
 <a href="#"><img src="../images/dBmelogo.png" alt="referentie" alt="dbme!" /></a>
</header>  
 <nav>
    <?php include_once('header.php'); ?>
</nav>
 <section>
  <aside>
  <!--right side baar -->  
  </aside>
     
  <article>
        <table border="0" cellspacing="5" cellpadding="5">
            <thead>
                <tr>
                    <th colspan="3">&nbsp;</th>
                </tr>
                <tr>
                    <th colspan="3"><a href="toepassing_add.php" >add toepassing</a></th>
                </tr>
                <tr>
                    <th colspan="3">&nbsp;</th>
                </tr>
            </thead>
            <tbody>


                <?php
// put your code here
                $q = new Query;
                $q
                        ->select('*'
                        )
                        ->from('`toepassingen`')
                        ->order_by(
                                array(
                                    '`toepassingen`.`sort` ASC',
                                )
                        )
                        ->run();

                $result = $q->run();
                $count = $q->get_selected_count();

                if (!($result && $count > 0)) {
                    echo 'No users found.' . "\n";
                } else {
                    while ($rows = mysql_fetch_object($result)) {

                        echo'<tr><td>' . $rows->sort . ' </td> 
            <td><a href="toepassing_edit.php?pid=' . $rows->toepassing_id . '">detail</a></td>
            <td><a href="toepassing_del.php?pid=' . $rows->toepassing_id . '">delete</a></td></tr>';
                    }
                }
                ?>



                <tr>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
            </tbody>
        </table>
</article>
 
    <aside>
  <!--right side baar -->
       
        
   </aside>
</section>
 
 <footer>  
<p>Lorem ipsum dolor sit amet...</p>
<p>Vivamus sed libero nec mauris pulvinar facilisis ut non sem...</p>
<p>Phasellus ligula massa, congue ac vulputate non, dignissim at augue...</p>
</footer>
</div>
</body>
</html>